package ObjectList;

import Iterator.Iterator;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractObjectList {
    protected List objects = new ArrayList();
    public AbstractObjectList(List objects) {
        this.objects.addAll(objects);
    }
    public void addObject(Object object) {
        this.objects.add(object);
    }
    public void removeObject(Object object) {
        this.objects.remove(object);
    }
    public List getObjects() {
        return objects;
    }
    public abstract Iterator createIterator();
}
